﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xplang.parse;
using xplang.abstractions;

namespace xplang.errors
{
  public class IncompatibleTypesError : Error
  {

    public IncompatibleTypesError(Token pos, ClassRef left, ClassRef right)
      :
      base(pos)
    {
      this.left = left;
      this.right = right;
    }

    public readonly ClassRef left;
    public readonly ClassRef right;

    public override String message()
    {
      return "Tipos incompatíveis " + left.refname() + " e " + right.refname();
    }
  }

}
